<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    const obj = { name: 'zhangsan' };
    function fn() {
      console.log(this);    		// {name: "zhangsan"}
      return () => {
        console.log(this);  		// {name: "zhangsan"}
      };
    }
    // call()方法可以改变函数内部的this指向，将函数fn()内部的this指向obj对象
    const resFn = fn.call(obj);
    resFn();
  </script>
</body>
</html>